Component({
  data: {
    visible: true,
    value: '',
    actionText: '',
    data: '',
    marquee: {
      speed: 60,
      loop: -1,
      delay: 0,
    },
    content: ['君不见', '高堂明镜悲白发', '朝如青丝暮成雪', '人生得意须尽欢', '莫使金樽空对月'],
  },

  methods: {
    check(){
      if(!wx.getStorageSync('hadAuthed')){
        wx.showModal({
          content: '需要登录后才访问！',
          title: '禁止访问',
          success: (result) => {},
          fail: (res) => {},
          complete: (res) => {},
        })
        return false;
      }
      return true;
    },
    actionHandle() {
      this.setData({
        value: '',
        actionText: '',
      });
    },
    closeBar(){
      this.setData({
        visible: false
      })
    },
    goToPhoto(){
      if(this.check()){
      wx.navigateTo({
        url: '/pages/photo/photo',
      })
    }
    },

    goTocultivation(){
      if(this.check()){
        wx.navigateTo({
          url: '/pages/cultivation/cultivation',
        })
      }
    },

    goToCompanyInformation(){
      if(this.check()){
      wx.navigateTo({
        url: '/pages/companyInformation/companyInformation',
      })
    }
    },
    goToTransportInformation(){
      if(this.check()){
      wx.navigateTo({
        url: '/pages/transportInformation/transportInformation',
      })
    }
    }
  },
});